<template>
  <h2>我是哥哥</h2>
  <div>我说：{{ money }}</div>
  <button @click="toSay">传话给弟弟</button>
</template>

<script setup lang='ts'>
import { ref, reactive, getCurrentInstance } from 'vue'
let money = ref<string>('送给弟弟一块钱')

// 获取组件实例，才能调用$Bus
const instace = getCurrentInstance()

const toSay = () => {
  instace?.proxy?.$Bus.emit('gegeSay', money)
}

</script>
<style scoped>
</style>